package com.example.library.service;

import com.example.library.entity.Seat;
import com.example.library.repository.SeatRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SeatService {
    @Autowired
    private SeatRepository seatRepository;

    public List<Seat> getAllSeats() {
        return seatRepository.findAll();
    }

    public Seat getSeatByNumber(int seatNumber) {
        return seatRepository.findBySeatNumber(seatNumber);
    }

    public Seat getSeatById(int seatId) {
        return null;
    }

    public void updateSeat(Seat seat) {
    }
}